<div class="user_header user_files w100 ">
    <div class="block2 mr20">
    
       <ul class="layui-nav layui-nav-tree layui-inline w100 act-nav " lay-bar="disabled">
         <li class="layui-nav-item home">
            <a href="/activity/user/activity.html"><img class="b1" src="__ROOT__/public/activity/images/list.png"><span>主頁</span></a>

         </li>

          <li class="layui-nav-item list {if !in_array(2,$user.roles)} layui-hide {/if}">
             <a href="/activity/user/active_list.html"><img class="b1" src="__ROOT__/public/activity/images/list.png"><span>活动列表</span></a>
 
          </li>
          <li class="layui-nav-item role {if $user.pid >0} layui-hide {/if}" >
             <a href="/activity/user/active_role.html" ><img class="b1" src="__ROOT__/public/activity/images/list2.png"><span>权限管理</span></a>
          </li>
 
 
       </ul>
    </div>
 </div>
 
 <script>
    var menu = '[menu]';
    var elem =$('.act-nav .'+menu);
    elem.addClass('layui-this');
    elem.parents('li').addClass('layui-this');
    layui.use('element', function () {
       var element = layui.element;
       element.init();
    });
    $(document).on('click', '[data-href]', function () {
       window.location.href = $(this).attr('data-href')
    })
 </script>